<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>白石溪畔</title>
    <style>
        .kk {
            width: 80%;
            height: 150px;
           /* 父亲添加伸缩布局 */
            display: flex;
        }
        .kk div {
            height: 100%;
            flex: 1;  /* 孩子的份数 */
        }
        .kk div:nth-child(1) {
            background-color: pink;
            flex: 2;
        }
        .kk div:nth-child(2) {
            background-color: purple;
            margin: 0 10px;
        }

    </style>
</head>
<body>
<div class="kk">
    <div>1</div>
    <div>2</div>
</div>
</body>
</html>